eg GateCustomApiExample (from the message on the left)
Main N4 Entity
N/A
Functionality
Road Module
Custom API
Description
Implementation to handle a message sent to the gate API in the format:
<gate>
<custom api-name="example">
(any content...)
</custom>
</gate>
Interface Method(s) and Injected Data
void execute(
UserContext inUserContext,
MessageCollector inOutMessageCollector,
Element inECustom,
Element inOutEResponse,
List<Element> inOutAdditionalResponses,
Long inWsLogGkey
) throws BizViolation
inUserContext contains the user that the webservice call authenticated with
inOutMessageCollector is used to add messages to the webservice response. Error level messages will result in an error status response from the API
inECustom is a jdom element that contains the xml message passed.
inOutEResponse will be returned to the caller. It is the element <custom-response> in the reponse
<argo-response>
<gate-response>
<custom-response>
<content added from groovy...>
</custom-response>
</gate-response>
</argo-response>
Content can be added to the <custom-response> element in the groovy to return to the caller.
inOutAdditionalResponses - elements added here will be returned in the response at the same level as <custom-response>. This is typically used in the Gate API's for additional information such as the <notify-wait/> instruction.
Exception/Transaction Handling
Exceptions will cause the status of the <argo-response> to be an error and a <messages> element will detail the exception.
Availability
2.1.6+